Update to improve hook system