Added alternative way of dealing with attributes/registry and inheritance. (Code is commented out next to current implementation.)