Preliminary support for "out transitions". Some minor code improvements
and bug fixing