Converted function to class. Reason: usage of longer variable names for equation parameters. This way not only 'x' but random names may be included too. Unittests have been added for these cases as well.