Add capybara trick & refactor