Fixed bugs, added invariants, and tested add