bug fixes, and begin work on wsgi response