Switch config file format to JSON, refactor config-package