Refactor views

Extract views into Blueprints (a Flask module)

This removes a lot of code from bin/lwp and moves them to lwp/views/*.py