Subgroupoids and Quotient Theories