change non-Bool enum representation and optimizer improvements