Added hasExpired member function
Added comments and fixed less than comparison