Separate printing and building output.
misc changes