Made equation methods more generic and moved them to parent Equation class