Initial module_utils

Brought from old projects..
Some fixes

Cosmetic fixes, file reorganizations etc..