Make refs work correctly in the data models.

Data models is now super sexy and stuff.
Fix localStore to resolve its promises correctly.