Refactoring and reformating, caching ResourceContainers

Moved message_fields creation to a separate method.
Reformated to make lines shorter.
Caching ResourceContainers (separate from proto models and collections)