Change remove_image to check if image is a dictionary and use Id value if it is.
Remove trailing whitespace.
Merge pull request #333 from alexliew/change_remove_image

Change remove_image to check if image is a dictionary.