Added file transfer and fixed some bugs.