Move inclusion of Shared out of headers and into the code proper