serve static assets in heroku
add tests and refactor