Some refactoring (OMS-467)