Refactoring of saltpad client