cleaned some js
Modified the 'where' test