added nak_limit commandline arg and attempted to fix some bugs...
not fully tested yet.