Fix hook code, add import, etc.
add hookc to gitignore