refactoring and rearranging css to be slightly more readable