Updates to DSP Functions

Optimized the existing dsp functions and added more dsp functions