Moved provider dependent code into the provider