Split code in common.pp