Declarative refactor

Closes #24. Unified provider API is next...