[GAE Server] Refactored code