cleanup and fix deadlink