Moved cowboy out of gen_server, and added SSL support