Heroku production setup and refactoring