Adding <> to queries and extra tests