Global references changes
Changes to do with global resolution
Changed PType
Made all the referencing much more simple