Clean

Moved handler and listener out of the server file