Version 4

Passes state machine state through to the Effect, Entry and Exit
callbacks.
General tidying.
MIT only licensing.