Add more tests and tidy - team 4

and who says you can't test AI???