Adding Collection+Json support and tests, adding self host, and refactor...

...ign config to make it reusable