Added documentation for getPossibleTransitions
Extracted an interface for transition so that the implementation doesn't leak