I added a bit of documentation and commented out some unused code.