More sql style fixes and 2 lines