Added hooks to compile on a commit.
Fixed some xref errors and typos.