Reorganized init logic;