Some more prefixing

Work in progress... but produces valid libraries so feel free to merge, I can just open a new request if I get around to make more changes.