Basic error handling
Dependency injection
Updated to new provider format
Restructured to provider format
Fixed example code