move connection option parsing, and rally obj building, to main prog