Save hooks function added, now just missing xtrace.