Puppetv3

Change design pattern to work with Puppet v3 while being backward compatible.