Refactored linker to be more general
Updated documentation and example