Refactored some topic list code.
Refactored more topic list code.