change non-Bool enum representation and optimizer improvements
testsuite fixes