Performance enhancements to the $ selector utility