Added a test state, updated code so state manager works