Commented and simplified code.