Deployment management code moved out of deployment module