added functions and refactored code to reduce size in css_parser.rs