clean up tests and move to WSGI