Formatting code and adding comments