Move sockethandler into its own module