Improved leakage of TrackCollectio.
Introduced function to stop thread and init.
Changes according to Daniel's review 8.