Moved a couple of static functions.