Represent state and symbol dictionaries as sets.

Resolves #3.