Added SFTP and code cleanup