cleaned up code and added shell script to run from dist folder