Persisting preferences working. Bit flaky though.