Most hacky fix to build, all the best from cut and paste, not to mention an anonymous namespace, sorry I'm raising kids, I make these concessions. Anyways, todo, remove duplicate code.