Added Topic resource and refactored