[PE-1872] polish the module before use in PE

This patch adds missing metadata and tests and addresses
a couple of lint warnigs.