web.py refactored to fit new datastore