Configure Capistrano, minor refactorings