Improved the error metric module slightly.