Generate track IDs in a better way. Solves #58.