- fix handling of TTL
- cleanup tests