Chore: Minor refactor to reduce minified js size