Eval metrics

This has a few bug fixes.