Refactor code to remove dependency on capistrano set