Refactoring, added autodeploy