code cleanup in views module