Switching from new to providers for easier testing.
Replaced all nulls with Options
Code cleanup and restructuring
Fixed compilation errors