Added everything I wrote to the main. This doesn't have working code in
the handlers yet, just stubs and TODOs