cleanup, repair annotations and relations