Added a few comments and formatting changes