Refactored lookupTable2.py and improved comparePWM function in pwm.py