Move assignments to this to where the functions are defined