Refactor: Topic model

Reducing Code Climate complexity metric