Optimization, iOS 7-ification, style refinements.

Oh, and I also added an option to modify the downsampling factor.