Pulled out indexing code to a separate file
Pulled out web handlers to their own file