add license headers; move IO utility classes