Small bugfixes, code cleanup, Link tab cleanup