Fixing tests and cleaning up mess from fixing calculation util