refactored css class selection in view layer