Css selector tests and improvements