did some refactoring of the server code and made way for file uploads