Locked capistrano to < 3.0.0
Refactoring
Added some tests