First working version with multiple trackers

Huge refactoring.