Autoscaler - refactoring