code clean-up
tests of math-impl module