Refactor track to remove unnessary code and variables