some design tweaks, now pushable to appengine