Fix for the master toolkit file so it won't crash on startup

- Fix for the end statements of the template
- Fix for the datetime. Now using the templates directly from the extension