Merging in master to the puppet branch

Also fixed tests