Templated State Manager

Added a template to the State Manager, in order to take any class with
states.
Added more states

More states to dispatchers and cores