refactored error views into single layout.