Change Nq to another name more sutiable.
Fixed various bugs.