tidied persistence and orm files