Added some helper classes and fixed the adder.