Refactoring error messages and header into partials, tests passing