Refactored topic controller