Added comments and better naming