Added single shot mode and accompanying demo