reorganization
changed added some more namespaces
changed some types to records