fixes #41 by adding an image position field, misc other fixes