created 'createDictionary' method to remove repetition
Merge pull request #3 from drexawn/cleanup

created 'createScanner' method to remove repetition