Improve code clarity and error messages for css selection