Smara's version with little improvements - added the ports to the properties file