Added some commenting. Not much more I can really do now.