add Control.cpp

Add Control.cpp and add write functions to Control.h