Cleaned up comments and formatting