Refactored original 1kw code to support hosting on Heroku via Dotenv