nsbcompile2: Move common code to base class