Persistence Refactor

@bajtos this is just an idea to clean up the persistence layer. Take a look and if you think this is worth finishing up let me know. There is quite a bit missing, but the general approach is here. Originally I started down this road to fix the id issue, but after digging deeper, it looks like we have to fix that some other way (eg. a rename API).