One wrong syntactic spacing.
Some checks in addFactor. Issues #3 and #2.

#3 closed
#2 closed
~test