move comon type definitions to new 'types' package