Refactor topics controller

Refactor: 1) TopicsController to reduce code climate complexity.
2) Topic model, addressed comments