Moved joins into its own module
Join to correct table in heirarchy