Refactoring some sqlTypes