Use expiration epoch instead of interval, some minor tweaks