Converted frequency to double

In order to support longer periods and put some granularity in low
frequencies, frequency was changed from long to double.
Removed debug, prevent negative frequencies
Merge pull request #8 from feilb/master

Change frequency to double to allow for time-accurate long periods