Rewrite page manager (id_pm.c)