Updated docpad.coffee to remove unnecessary stuff
Switched to a more robust state system with better UI structure