Re-oragnize code in 'base_deployer.rb'