Refactoring xyz.pgm.app to xyz.pgm step2