Some refactoring [skip CI]
Some refactoring [skip CI]


Former-commit-id: 79335825c8fa1c07367948bf6b1f838958e33cc4 [formerly 4583e0af6c400c7ae95e982057a9f54e4b63deeb]
Former-commit-id: 71e2d2461294e8fc082983f7fbd5b57045313d27
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine