convert module to advanced module

I needed this so decided to write it now. It is on the list of requested 'advanced module' features.

I haven't added any UI yet - would need that spec'd first.