Added persistence and some other stuff. Sorta half baked at this point.