Added some stuff from eval-metrics
Rewrote and shortened implementation
merge