more progress on model and protocol refactor

partially working with loopback provider; possibly bugs in identity necessitate
hacks