Fix BC break by reintroducing the ResultFactory class

Fixes #235