Why did you want to move these 3 if(){} blocks up in the file to here?