Updated sineMod2() and run() to better handle the params struct