Move function definitions around to prevent byte-compilation errors.