Organize imports
Make changes to client to make it work better with new uploadfile/server

Also make some changes to the server, to make it work better with the client

Work in progress.