Move JS setup code up into lib macro.
Remove a few redundant messages from build.