Improved comments and removed commented-out code