sorting of referential links, some JS cleanups, margin below activation link for sage cells, etc.