if connmand crash, the agent won't fail horribly

Change-Id: I2d51323868edc126ceb04bbc01c4fdafdb6d455e
remove some sneaky memory violations and add a more pleasant way to change some configurations

Change-Id: I48994310f7afb47a097be47a5e90e9903001a728