Fixed factor bug and finished testing setFactor