initial refactoring of track iteration
more debugging tools
never leave debugging code in a commit...
tests for track added and more debugging code added