Move init script into a separate file.