Some minor changes; working example