Refactored the initialization.