Improved assertion failure messages. Relates to #41.