Fixed documentation, added hook initialization function