Refactor build script and make use of nodes foldure modules to clean  some stuff up.