Changed resolving of template. Cleaned up the topicRegistry.