Extracting load balancer and instance getting into methods