heroku refactor