Add object expiring. fix minor bugs.