Fixed .pop() and length.

Hi, neat little thing you wrote there.
I gave it a try on a fiddle and the last element doesn't get popped, so I added the else statement.
Also decremented the length counter when the method gets popped.
Lastly, the tabs got changed to spaces (I can revert that if you'd like).