behavior composer and local emu refactoring complete. TODO: test.