Use a templated ComponentManager instead of macros