refactored some FTP code #untested #classcommit