Began seperation of logic and testing.
Added some changes to the persisted flag.