Change movement function to take references to images, and allow images to be directly compared.