Added next and nextInt functionality.