Style

Fix KWStyle detected errors and add pre-commit hook.