Tests repaired.
Added a hook to run tests before each commit.