Add TrackFitter class and major restructuring of the code base