Large refactor using maps, better extends

Most of this is a straight refactor, generated output is the same however there are a few additional extends and surgical classes.
These are set up as normal extends, of which they will most commonly be used within another selector however they can be used directly on an element if necessary. Setting these up as extends allows our code to be much more modular and performant.