Derivation refactoring