Improved performance by switching Integers to Ints so that there is less overhead