Added Capture infrastructure
Fixed bug with base 64 encoding of image bytes