separates concerns regarding keyboard, adds state replica for sockets