removed nnx dependancy.  Fixed a few bugs.