Move out hook sources to their own files