Fix linking problem and hardcoded paths

May be better to stick to your repo, since further changes may be needed when I'm not available.