Fixing mock function and adding command line arguments --port <port> and...

... --mock to enable visual studio debuging