Half way through getting persistence working.