Move parser logic to template (fix typos)

Nmaespaces now correctly match directory layout; Fixed config loading