Move app to top-level directory
A few comments, a lot of reindenting