Replaced include math.h with cmath, and changed from fabs to abs. Fixed an error in the testfile, a filename was wrong