lots of tidying up
begin refactor of binned stats