Modularize taking and sending pictures