Changing java version to 1.6; Adding interface to StateMachine; Adding documentation to StateMachine