fix ProductType values and some refactoring