feat(data-provider): use utility functions from client and clean up code
Removes duplicate function definitions and use utility functions from the client in more cases. Also adds a dependency to the client lib so we clearly know with which version it is compatible