finish custom module naming scheme support

this fixes #687, and is a big step towards fixing #862