Refactored install and link.sh