PersistenceUtils refactoring and Layout fixes