Emit.hs rewrite

Made Emit.hs actually readable, uses Text.Printf instead
Removed some unecessary helper functions, cleaned up some
type signatures.