Changed structure to better reflect package semantics and hopefully avoid namespacing issues