Teared out more parts

Teared and rewritten some Puppet related code