Add contributing doc and pre-commit hook