refactor styling for views