bug fix for relative protocol external libraries. also added ability to add external libraries