Added formatting and comments