A few more functions moved to common.pm