fixes to metrics, various other changes
merging fun
merging