Common functions used by Wolvan's Mods