correcting javascript based on testing
Merge branch 'master' of https://github.com/sdkell2/mhacksJan2014