Cleanup: set var static
Cleanup: de-duplicate text select logic
Cleanup: bool