BitArray refactored out of stoke. New optimizations.