Testing and a little refactor for lease timeouts