fixed local links to be dynamic and set up environment