cleaned up getPort method
Merge pull request #66 from JanMalte/getPort

cleaned up getPort method