Added sockets, fixed file downloading