Removed some un-required code
Added possibility to change the server and port
Code reformat