finished initial upload server, fixed some bugs