merge model change for consistency, and basic access control

This PR includes changes from PR #19 and adds basic access control.