Implemented basic writing.