Update tests, fix minor issues.