Add tests, code cleanup, suppressions for warnings.