[PATCH 2/3] reg: Split 'delete' functions from reg.c