Optimization of the sftp class.