Merge pull request #4 from kwurst/stoney

Add diagram.
Fix error checking.