Refactor to allow Capybara to use javascript
Add tests and some implementation for taking a turn