Adding support for transitions to dynamic targets. Also removing dead code.