SQL logic fixes
quick restyle of comparison page