Removed underscore dependency/Added compare smart query

@wmathurin or @akhileshgupta can probably speak better to the implications of switching away from underscore here, than I can.