Refactoring for code reuse
Merge branch 'feature/er-restapi' into development