Adding some comments and formatting