Reformatted file, and added support for gae api v2