Dodgy debugging stuff I should probably remove.