Use enum for e.g. type dictionary

Issue #54 new