Major reshuffle of everything
makes the headers easier to read and navigate
Also add forward declaration headers for document & element