more code refactoring
more code refactoring


Former-commit-id: 62ff1086e9f91571069e7fcc52b31b258fe2ac4e [formerly 62ff1086e9f91571069e7fcc52b31b258fe2ac4e [formerly 9d5c60534960518c382e3ae35d74bfd6144ed96c]]
Former-commit-id: 2e2fdf129b39a93175833e7660b7d3359108ab5f
Former-commit-id: a8c0a5c5dcd259ef0150b1ba10bdba050808347d
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine