some refactoring. Segmentation inprovement
more refactoring, added simple tracker