Autoscaler unit tests, minor cleanup.