raise exceptions; wrap everything in dicts; flesh out wsgi code