Move all JSON config out of library code and allow for dynamic adding of listeners