#18 add config loading and template config