Implemented auto expire

Close #5