fix path to imageoverlay. remove duplicate function defs