refactored metrics

@rcrichton please review, this is a new branch based on a more recent version of master
OK cool, you are right, seeing as there are no generators here anymore