Narrow and correct the template types used for refs where possible. Give correct inheritance to shader properties for Skyrim and later.