Move the app code into the app dir and move the packages dir to lib.

Also got jinja2 working locally.