Rewrote all type attaching in namespaces ; types are now attached directly as properties instead of being held in an array.