Regarding the first error, there's a typo in the call to "template::head:add_style". It should be "template::head::add_style" (2 colons before add_style not only 1).