Refactor capistrano tasks