Add comments and code formatting.