Finishing logic so Capybara tests pass