included IP in header and a few small fixes to scripts