Don't forget to release the bitmaps.
Don't always retain the proc, do it only for new procs. This enforce a strict policy in the BML, it has one and only one ref on each proc.
Don't forget to call del_procs.
Various minor cleanups.