clean up and fix links