Made functions for the preparation and hiding of a pile's contents for scripting
bugfixed new pile functions