Refactored code into the module pattern

Snippet CRUD, Topic CRUD, and SC namespace