Refactoring and improving code

## Key points:

* Improving code with small refactoring base in rails_best_practice gem
* Fixing capybara testing