code and link cleaning

a bunch of small stuff