Refactoring prototype code into Origin CSS