I looks like this might be able to be done with different query parameters and filtering. I'm not running this code locally, so I can't run it to see exactly what the view spits out, but it looks like it can be simplified.