Dynamic port based on PLoc, GETh in progress

Also a little cleanup of some formatting functions