clean up the symlinking code a little bit