Various optimizations.
Merge branch 'master' of https://github.com/Alex-Huleatt/Panther
Cleaning it up, comments and whatnot.