Modified candy-calc API to work with unit and validator objects being part of the cc object.