Added support for top level attribute selectors
Improved stability