Bunch of random cleanups and adding support for deploying apps.