tidying up some bits, switched from class to namespace