Capybara tests and minor changes