Added comments and formated