Lots of repetitive code, probably need to use different dataframe than gm_codes to better check full functionality of all the joins.