Added comments and cleaning