Modularize output building.