more type refactoring
Merge pull request #1565 from WalterBright/b37

more type refactoring