Added default error function and mse.