Minor Bugfixes & Added Template Events

Fixed some minor bugs and added the main structure for
template events.