Added query templates
Added collection relation