Refactored webserver into its own module