Refactor so we can read build info from a supplied stream