Finally built sophisticated snippet generation.