cleaning up some dev console.logs and adding if, again to avoid key error when segment.tracks not populated.
cleanup missplaced if statement.