Major refactor

* redesign as an object-oriented app with esiParser() as constructor
* replace some jQuery-isms with vanillajs where possible