QOL update for selectExtensions.js; cleanup nested switches

Nested switch statements are radically poor form for readability and structural programming standards. Cleaned up the writeValue function to only use a single switch, for greatly enhanced readability.