Split nx into a proper sub-mod.

Signed-off-by: Peter Atashian <retep998@gmail.com>