Adopted a more OO-friendly design

- pylint and pyflakes are sort of happy
- added 8bpp -> 10bpp conversion
- added 10bpp -> 8 bpp conversion
- simplifications
- updated unittest