Implemented position tracking
Changed main loop signature (img not needed anymore)