Make calculations more stable. Add unit test.