Added puppet code, minor fixes.