Changes to IGenerator; Phase calculation in SawtoothGenerator