Documnetation update and code cleanup for populate scripts.