Stripped trailing whitespace; potentially fixed some bad writes in add_bitmaps