Code cleanup; fixed nxtfive tools; fixed density

Change-Id: I30124d5382a3d39d8cf2dd991248f975036e503a