add a first line to put editor in erlang mode
more refactoring, moved some cowboy code into its own module, and add more specs
fix shutdown code, gen_smtp_server/1 should take a pid
move some of the request handlers to their own module