enumeration cleanup
add some memory related TODO