More work to adapt to AppEngine