First commit: Basics of protocol and connection management