Moved joins into the Table class