changed web server to class, ready for integration in threads in main.py