First attempt at Heroku-compatible version