Hrde app

This PR includes a number of improvements, new features and bug fixes to the application formally known as the hazard viewer. 
Please, avoid this huge amount of global vars and us an object that include all of them instead.
http://code.tutsplus.com/tutorials/prototypes-in-javascript--net-24949