Added some necessary stuff
Important changes in the template