Represent state and symbol dictionaries as sets.

This resolves #3.