Fixed memory leak
Accepts port number as command line argument