Common functions, used by other repos.