Changed deprecated UI... variables to new NS... variables