Made extractBits a globally-accessible function (not defined locally in split anymore)