Added and utility for merging objects

* Added state getter/setter to StateManager
* Added previous and next methods to the StateManager
* Added new optional params to the BaseState constructor