TypeValue.Type: constants => enum
fix a few issues found by findbugs
drop use of legacy Vector and Hashtable