Update selector-css2.js

Simplified and cleaned up a bit of the logic.