Refactor actions for creating topics and replies.