Refactoring stylesheet library for extensibility.