Moved picture-taking to takePicture method