some refactoring of stuff in Types