Split query types into individual classes.