Change convention for assigning local this and change port assignment so that it doesn't mutate the process environment