cleaned up image import, it should be easier to read now