Add comments and improve language switcher JS binding