Refactor data access and model

Various changes to the data model and the supporting server side data
access architecture.