Improve the expiration code.