Refactored autodeploy into class extension.