first comment is about cosmetic aspects but, notice how DEFAULT_MODULECLASSES has a K&R style,
meanwhile much else has a more arbitrary indentation level depending on the length of the variable name?

In fact, I think that either should be improved: use of 2, 4 or 8 fixed indenting spaces improves readability without imposing
artificial competition between a variable name's length and the content assigned (think of "description" here at 120chars) plus,
the closing bracket should be placed in a consistent manner, to help signify the block level when multiple nesting is occurring.

This comment could trigger much decorative improvements, so handle it as such: just consider it and come back as needed.