refactored track pane code issue #291