Refactoring of deployment tasks handling