Added onMove callback, renamed onEnd