Fixed typo and some code formatting issues