Improves error messages, which used variables instead of message string (fixed in last commit): unifies messages for same error types and adds more information to some messages.