Cleaned up the number number reading logic for better readability.