Sped up algorithm

Identified accessing and saving bitmaps as the most 'expensive' part of
the algorithm. Now leaving drawing changes in the drawing client, then
saving all layers at the end, instead of each time they are drawn on.