remove unused "context" for after/before transitions
It seems to make more sense to controller the context from the statemachine
improve error handling