separated freeze and thaw from main object and did some reformatting to make development more clear