clean up some layout, and adds error message display