Improve tab styling and refactor variable usage