Add new snippets and modify code style