State Monad is working now

* Needs more testing
* Needs further refactoring (a lot of it)