Fixed a bunch of small javascript bugs. Reorganized Variable parsing somewhat to allow for translation through file (still needs to be tested and there are some points that don't yet function).