Refactoring CSS generator