More informative error messages. Closes #218