Added fix for testing command line port
Cleaned up source a bit
fixed spelling mistakes, added usage to header of file