Cleaned up web server and fixed some bugs