Refactored rackmanager stuff in the balancer