Display error messages, rearranged code and fixed up partials.