Unit tests passed after major refactor...

Datasource model is partially done, needs additional unit tests to
cover async behavior
StateCache now takes advantage of ds