Improve initialization scripts to guard against running multiple times