[connectionagent] fix autoconnect ->cell.

optimize a bit, clean up and remove unneeded code.
Merge pull request #17 from lpotter/cleanup

[connectionagent] fix autoconnect ->cell.