Work on error page
refactoring