Major refactor of router and collections.