Separated the tracking code from TraXing main in a standalone class.