Basic protocol implemented. Still some work to do.