Commented the template and added a debug flag.