Code improvements to LFO

Trying to use just one function for the LFO calculations