Changed to use environment to get port from instead on command line