Added some math stuff.