Rewrote python connectWithAdminInfo

Some minor changes. I think the title of each commit is pretty much self-explanatory.