Rewrote squared error function, changed nnj package layout, and added some unit tests for nnj.util.