WIP playing with Emit
WIP minor refactoring