Refactored render blocks of agents, environments, templates into separate macros