Added enumhelper and tests. General improvements.