Only create clientVars when they are needed
Added hook for clientVars and hook-doc
Merge pull request #1358 from mluto/clientvars-hook

Make the creation of clientVars hookable