changed config file format, code reorganization