refactored a bit
Included capybara example