Major refactor of the code to introduce container->collection->page concepts.