Fix tests and code-validation