Simplified example and fixed a few errors