resolves any links to script & some cleanup