Memoize the model scope generation
Throw an error if we get an unrecognized sub-scope name
Remove commented out javascript