Updates to enable processing CSS media queries.

Enable the processing of Media queries by wrapping the process logic in
a recursive method which detects if the rule is a media tag then
processes all child rules.
Modified the code to be more functional.
Updated formatting.