moved error-functions to separate files, made division by zero save
upated unit-test script