Test-fix, code cleanup