Removed the lines used to check if the script is running locally
Made changes to make it work with remote images