Document manager Prototype + Factory + Template