Adding port parameter
Script is now Python3 compatible
Fix cmd line params