CMSPLT-25:  Some JS refactoring for citizenship