Always make the port an integer

#4 wasn't enough, as the port is used in several places, which I didn't notice until now.
This makes the port an integer in the initializer, therefore making it an integer everywhere.