Emitters

Implemented emitters, fixed up memory handling for them too.