Adding enumeration support and cleaning up some other miscellany