Split script for clean and non-clean startup.