Implement global templates container and filtering by templates on alloc...

...ate (OMS-253)