Factor out integer checking. Hopefully this doesn't break shit, but the things being extracted as floats were sometimes turning into X.YYYYYe+ZZ, which int() helpfully then refuses to turn back into an int. Hoping this is more resilient.