Starting port numbers from 0, tidying ptolemy xml file.