Refactor configuration parser, going to reuse it for python domain