Adding Collection+Json support and tests, adding self host, and refactorign config to make it reusable