Improve error messages and documentation for dic() requirements.
Add error checking for inputs and inits.
Move code for names() methods.