Implement cross-validation. This is not fully tested.

Also rename λ to lambda in the code, since it's a lot easier to type