Added smart joins to framework