[MaNGOSExtractor] refactor some code and tidied up