Refactor diagram styles and classnames