Convertion to integers. Needs sanity checks.