symlink bugfix and code improvements