Tidying up some things while looking for the bug.