Cleanup the error messages and improve the interface