Make calc mixin more universal; fixes after code review v2