Added hook wrapper and plenty of other stuff I can't remember