bug fixes

Fixed a couple of bugs and changed the cross-validation to use 10-fold
CV