Added track constraint and parameter

Thanks to Eli Spizzichino for adding the constraint. I have gone one
step further adding a parameter to decide if the track is added or not.