Fixed some referencing issues quite possibly
Maybe picks the right names now, or breaks everything
 A merge I think?