Improved comments; simplified code.