Secondarytype

The main of this pull request is d724598.
eabad29 is included expediently.