Refactored cssmetrics lib