How to get rid of unneeded vertices?
First, delete the inner face by selecting it and pressing Delete > F. Next select the edge loop and press Ctrl+E to bring up the Edges menu, and then press G to select Edge Slide. Now slide the edge to the top or the bottom:



Now select all with A and remove doubles with W to bring up the Specials menu and then R to select Remove Doubles. You should now be back to your standard cube mesh shape: