Add pre and post transition hooks. Fixes #10