Setup some generally useful functions