Working on connection logic.

Have to go, but just need to implement the messages and we should be
good to go. Refs #14