Use sampling rate for timing + code cleanup