Several updates to KB build script. Runs now.