Fix "richter", add some more documentation and style fixes.