Refactor puppet::common