Few memory problems solved; Added infinity test, pointer test