Cleaned up and used correct methods for remote file retrieval