PWM method efficiency improvements and MoonPhase whitespace cleanup