[WIP] Fix failing tests

Fixes #362

First set of Provider test cases fixed. I will continue tomorrow ;)