Code cleanup

I removed some commented code that was not necessary and added some
comments to explain the different fields and methods.