Fixed code formatting and comments