refactor terrible CSS