* Improve bitset operations.

* Refine code.
* Fix bug