First pass at splitting out server and wsgi apps. Broken ATM