little change on expires at of checkin
Structured some parts of the code in a better way