tidying up and trying to get tests running