Implement config and json loading.