Split main module into submodule. Common function and jinja2 filters are now in separated files.