Added cmd arguments and moved Connection definition to own file