enum support, cleanup