cleaned up code (web_app)