Move init functions outside constructor