Refactor of JS

Change of the developed JS to an OOP approach. Due to IE compatibility,
substitution of the ajax call for the ajax shorthand getJson.