Add sample rate code, remove sample rate preference