Added jQuery and added options to index.html
Rewrote parts of the simplification code to make it more organised