Extend calculator to support other data types, literals, stack manipulations and conditionals (#1622)