diff --git a/foundation/Cargo.toml b/foundation/Cargo.toml
index 4c7fc5b..e2ca9ce 100644
--- a/foundation/Cargo.toml
+++ b/foundation/Cargo.toml
@@ -23,4 +23,6 @@ serde_json = "1.0"
openssl = "0.10"
uuid = {version = "1.1.2", features = ["serde", "v4"]}
tokio = { version = "1.9.0", features = ["full"] }
-serde = { version = "1.0", features = ["derive"] }
\ No newline at end of file
+serde = { version = "1.0", features = ["derive"] }
+
+protocol = { path = '../protocol' }
\ No newline at end of file
diff --git a/foundation/src/connection.rs b/foundation/src/connection.rs
deleted file mode 100644
index fe3064b..0000000
--- a/foundation/src/connection.rs
+++ /dev/null
@@ -1,146 +0,0 @@
-use std::{
- io::{Error, ErrorKind, Write},
- mem,
- sync::Arc,
-};
-
-use serde::{de::DeserializeOwned, Serialize};
-use tokio::{
- io,
- io::{AsyncBufReadExt, AsyncWriteExt, BufReader, ReadHalf, WriteHalf},
- net::{TcpStream, ToSocketAddrs},
- sync::Mutex,
-};
-
-#[derive(Debug)]
-pub struct Connection {
- stream_rx: Mutex