Fixing automatic deployment and refactoring