Extracted from https://bitbucket.org/bryan/wmexamples/