Improve flash and error messages