Unit tests, tweaks & file hash checking