Refactor terms