Can't these two select calls be merged into one where we && both conditions together? Also, undesirably long line of code here.