appengine refactor in a MVC framework