Refactoring. Mapping derivation implemented