Merge pull request #430 from bem/BEM-931

Add ability to write level config module as a function (closes #364, BEM-931)
Merge pull request #457 from bem/backport/BEM-931

backport: Merge pull request #430 from bem/BEM-931