Added intelligent next_track algorithm