Cleaned up implimentation of track output