Remove the made-up isInteger function and just Math.floor numbers that need to be integers.