Use sampling rate for timing + code cleanup
Merge pull request #9 from csfrancis/sampling_rate_for_timing

Use sampling rate for timing + code cleanup