Replaced switch statements with if statements so you can create a library
Allow subclassing the CaptureActivity