Split off the HTTP handler into its own file.