Number parsing refactored in Core.Scanner class.