Refactoring for orka wrapper and database remote update