Added loads of new tests.
Added addCurrenState()
added defaultFunction stuff for addStateMethod()