Added tokens and made improvements on scanning.