Cleaning up some formatting issues and adding some comments