class attributes and dictionary constructors

Added a class attribute where appropriate.

Dictionaries can now be constructed from anything with a .each method.