Added code to make overlaying more flexible

Added code to use WriteableBitmap as a source for the imagebox instead
of BitmapImage. This allows access to individual pixels in the image.
Also added code to overlay files directly onto the the image in imagebox
to help toggling overlays on and off. Calling the function occasionally
causes crashes, so this function is not being called anywhere now.