Simplify light and dark theme functions following upstream changes