Changed relative references and fixed tidyr namespace issue