Improved startup code.