did some refactoring, still need to do some more. Mostly I have to move all the default constraints out of index.html and into a separate file, I also still have a lot of commenting to do