Some more refactoring. Added IScanner interface and its default implementation