lots of fixes, added track redrawing