Improve config manager to use standalone main.py

Improve templateutil with user and request