Move joins to the scope