added debugging and port parameters to distributed code
Added state handler for DistributedAmuse
Fix for state handler