Added a state service that allows us to keep track of global state.

This might not be very angular :(