Code cleanup, fixed some links