Added more code templates
Added data query template
Implemented Events generation