Generalize config type and parser function