Refactored code, made code API friendly.
Fixed bugs.

Refactored code.
Corrected file format errors.  Works with test bitmap.
Need to add support for reading PNG files.