gae persistence refactored