Parameterize rmi ports, clean up scripts