Implemented the Scanner.