added StdLibMath
code style
compile/runtime fixes