fixing relationships and renaming join tables