move all the webapp stuff into webapp directory, refactored a few things in app.js