Scanner unit tests added
Replaced the scanner with a new Flex-based one