This cleans up this header and moves the functionality into more useful places while reducing the include complexity but only pulling in whats required.