Refactor jade