finish api functionality for comments and snippets and edited the comments and snippets pages