Refactor initialization.