Fixed incorrect bit length calculation.
Cosmetic changes.
This is version 0.0.2.