refactored and added tests for Css validates.