Refactoring error page component and layout