More generalization of calculators

Fixed bug #22