Cleaning
Some old events now use register_function instead of foreach()