Continued refactoring of PAN code