Fix and clean castle/tests.