More helpful error message when people try to pass in non-hash values as the data-model. Also bit of a code cleanup there.