Refactored calc, removed useless parts. Unified API for formulas.
Merge remote-tracking branch 'origin/master'
Merged changes. Fixed tests.