Gh huge refactor with el6 support

small change to support puppet2 clients