Added functionality to take pictures and choose pictures from gallery