Update error messages
Refactor configuration