added comments, cleaned up some unneeded commented-out code.