New implementation for GetMissingDictionaries

Changes in as discussed on skype, if you prefer the functions not to be static, I can make them private.