Improved error messaging.
Added more examples.