Got **something** working for the error metric part of the project. I
have no idea if it's correct at all... but it's a start.