Refactor app for deployment.