Added todo note
Updated comments
Introduced G.Template class from existing code