Add comments and formatting