Coverage and pre-commit

Added test coverage scripts and pre-commit rules.