formatting, cleanups; automate library symlinks