Improved build process for nw