file transfer: Code cleanup