Fix naming to correspond to xml db
Parse textual config, some minor refactorings