Implemented combat

Also, did a bit of tidying up and refactoring