Moved $CI loading to the actual function which uses it, as per the rest of the helper