Add persistent option, other small changes