Added errors to template, fixed errors