general cleanup, remove global vars, use template.ParseGlob