refactored metrics

@rcrichton please review, this is a new branch based on a more recent version of master
Perhaps you should check the values of the properties here to?