Fixed push()/add() returning undefined sometimes.
Add some useful comments and clean up errors
State() should return 'pending' while it's pending to match jQuery