8x8backpack: clean up code and make it properly a library

also fix the "never set last pixel" bug