Improved practices in the view code