Implemented self-init for the first run.