Rework hooks API