Combined initialization into functions, various naming tweaks