Added parameter checker utility and math functions.