Simplify the view code.