plugins/topic: cleanup and formatting