Doxygen-compatible code in clm, cm and wi settings
PEP8
Unused code and imports removed
Docs and comments fixup
Add missing licence to CM migrations