Formatting fixes and added comments