Refactored Scanner to use IntegerScanner