build script + minor tweaks