Includes conflict resolved PR 127 and other fixes

Includes Alain91's changes in PR #127 as well as some fixes for namespace issues.

Alain's changes resulted in several conflicts that had to be resolved manually (fork didn't have most recent changes?) 

Also, removes references to XoopsModuleAdmin and fixes some Exception vs \Exception issues pointed out by scrutinizer CI.