Add tests to math.go
Add more comments